added SSCLI 1.0
[windows-sources.git] / shared source / sscli_ref_20021101 / docs / System.Diagnostics / System.Diagnostics.html
blob3bd2c44c2324c0f7d76f14b27075dc4407c810ed
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html>
2 <head>
3 <META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
4 <link rel="stylesheet" type="text/css" href="../refdoc.css">
5 <title>Namespace: System.Diagnostics</title>
6 </head>
7 <body>
8 <h2>Namespace: System.Diagnostics</h2>
9 <dl>
10 <dd>
11 <p> The <a href="../System.Diagnostics/System.Diagnostics.html">System.Diagnostics</a> namespace provides classes that allow you to interact with system processes, event logs, and performance counters.</p>
12 <ul>
13 <li> The <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemDiagnosticsEventLogmemberstopic.asp">EventLog</a> component provides functionality to write to event logs, read event log entries, and create and delete event logs and event sources on the network. The <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemDiagnosticsEntryWrittenEventHandlermemberstopic.asp">EntryWrittenEventHandler</a> provides a way to interact with event logs asynchronously. Supporting classes provide access to more detailed control, including: permission restrictions, the ability to specify event log types (which controls the type of default data that is written with an event log entry), and iterate through collections of event log entries. For more information about these tasks, see the <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemDiagnosticsEventLogPermissionmemberstopic.asp">EventLogPermission</a>, <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemDiagnosticsEventLogEntryTypememberstopic.asp">EventLogEntryType</a>, and <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemDiagnosticsEventLogEntryCollectionmemberstopic.asp">EventLogEntryCollection</a> classes.</li>
14 <li> The <a href="../System.Diagnostics/types/Process.html">Process</a> class provides functionality to monitor system processes across the network, and to start and stop local system processes. In additional to retrieving lists of running processes (by specifying either the computer, the process name, or the process id) or viewing information about the process that currently has access to the processor, you can get detailed knowledge of process threads and modules both through the <a href="../System.Diagnostics/types/Process.html">Process</a> class itself, and by interacting with the <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemDiagnosticsProcessThreadmemberstopic.asp">ProcessThread</a> and <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemDiagnosticsProcessModulememberstopic.asp">ProcessModule</a> classes. The <a href="../System.Diagnostics/types/ProcessStartInfo.html">ProcessStartInfo</a> class enables you to specify a variety of elements with which to start a new process, such as input, output, and error streams, working directories, and command line verbs and arguments. These give you fine control over the behavior of your processes. Other related classes let you specify window styles, process and thread priorities, and interact with collections of threads and modules.</li>
15 <li> The <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemDiagnosticsPerformanceCountermemberstopic.asp">PerformanceCounter</a> class enables you to monitor system performance, while the <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemDiagnosticsPerformanceCounterCategorymemberstopic.asp">PerformanceCounterCategory</a> class provides a way to create new custom counters and categories. You can write to local custom counters and read from both local and remote counters (system as well as custom). You can sample counters using the <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemDiagnosticsPerformanceCountermemberstopic.asp">PerformanceCounter</a> class, and calculate results from successive performance counter samples using the <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemDiagnosticsCounterSamplememberstopic.asp">CounterSample</a> class. The <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemDiagnosticsCounterCreationDatamemberstopic.asp">CounterCreationData</a> class enables you to create multiple counters in a category and specify their types. Other classes associated with the performance counter component provide access to collections of counters, counter permission, and counter types.</li>
16 </ul>
17 <p> The <a href="../System.Diagnostics/System.Diagnostics.html">System.Diagnostics</a> namespace also provides classes that allow you to debug your application and to trace the execution of your code. For more information, see the <a href="../System.Diagnostics/types/Trace.html">Trace</a> and <a href="../System.Diagnostics/types/Debug.html">Debug</a> classes.</p>
18 </dd>
19 </dl>
20 <h3>Members of System.Diagnostics Namespace</h3><b>Classes</b><dl>
21 <dd>
22 <table border="1" width="90%" style="border-collapse: collapse">
23 <tr valign="top">
24 <th bgcolor="#C0C0C0">Class</th>
25 <th bgcolor="#C0C0C0">
26 Description
27 </th>
28 </tr>
29 <tr valign="top">
30 <td width="30%"><a href="types/BooleanSwitch.html">class BooleanSwitch</a></td>
31 <td width="60%"> Provides a simple on/off switch that controls debugging and tracing output. 
32 </td>
33 </tr>
34 <tr valign="top">
35 <td width="30%"><a href="types/ConditionalAttribute.html">class ConditionalAttribute</a></td>
36 <td width="60%"> Indicates to compilers that a method is callable if a specified preprocessing identifier is applied to the method. 
37 </td>
38 </tr>
39 <tr valign="top">
40 <td width="30%"><a href="types/Debug.html">class Debug</a></td>
41 <td width="60%"> Provides a set of methods and properties that help debug your code. This class cannot be inherited. 
42 </td>
43 </tr>
44 <tr valign="top">
45 <td width="30%"><a href="types/DebuggableAttribute.html">class DebuggableAttribute</a></td>
46 <td width="60%"> Modifies code generation for runtime just-in-time (JIT) debugging. This class cannot be inherited. 
47 </td>
48 </tr>
49 <tr valign="top">
50 <td width="30%"><a href="types/Debugger.html">class Debugger</a></td>
51 <td width="60%"> Enables communication with a debugger. This class cannot be inherited. 
52 </td>
53 </tr>
54 <tr valign="top">
55 <td width="30%"><a href="types/DebuggerHiddenAttribute.html">class DebuggerHiddenAttribute</a></td>
56 <td width="60%"> Specifies the <a href="../System.Diagnostics/types/DebuggerHiddenAttribute.html">DebuggerHiddenAttribute</a>. This class cannot be inherited. 
57 </td>
58 </tr>
59 <tr valign="top">
60 <td width="30%"><a href="types/DebuggerStepThroughAttribute.html">class DebuggerStepThroughAttribute</a></td>
61 <td width="60%"> Specifies the <a href="../System.Diagnostics/types/DebuggerStepThroughAttribute.html">DebuggerStepThroughAttribute</a>. This class cannot be inherited. 
62 </td>
63 </tr>
64 <tr valign="top">
65 <td width="30%"><a href="types/DefaultTraceListener.html">class DefaultTraceListener</a></td>
66 <td width="60%"> Provides the default output methods and behavior for tracing. 
67 </td>
68 </tr>
69 <tr valign="top">
70 <td width="30%"><a href="types/DiagnosticsConfigurationHandler.html">class DiagnosticsConfigurationHandler</a></td>
71 <td width="60%"><i>
72 This type supports the .NET Framework infrastructure and is not intended to be used directly from your code.
73 </i><br><br> 
74 </td>
75 </tr>
76 <tr valign="top">
77 <td width="30%"><a href="types/Process.html">class Process</a></td>
78 <td width="60%"> Provides access to local and remote processes and enables you to start and stop local system processes. 
79 </td>
80 </tr>
81 <tr valign="top">
82 <td width="30%"><a href="types/ProcessStartInfo.html">class ProcessStartInfo</a></td>
83 <td width="60%"> Specifies a set of values used when starting a process. 
84 </td>
85 </tr>
86 <tr valign="top">
87 <td width="30%"><a href="types/StackFrame.html">class StackFrame</a></td>
88 <td width="60%"> Provides information about a <a href="../System.Diagnostics/types/StackFrame.html">StackFrame</a>
89 </td>
90 </tr>
91 <tr valign="top">
92 <td width="30%"><a href="types/StackTrace.html">class StackTrace</a></td>
93 <td width="60%"> Acquires a stack trace. 
94 </td>
95 </tr>
96 <tr valign="top">
97 <td width="30%"><a href="types/Switch.html">class Switch</a></td>
98 <td width="60%"> Provides an base class to create new debugging and tracing switches. 
99 </td>
100 </tr>
101 <tr valign="top">
102 <td width="30%"><a href="types/TextWriterTraceListener.html">class TextWriterTraceListener</a></td>
103 <td width="60%"> Directs tracing or debugging output to a <a href="../System.IO/types/TextWriter.html">TextWriter</a> or to a <a href="../System.IO/types/Stream.html">Stream</a>, such as <a href="../System/types/Console.html#Out">Console.Out</a> or <a href="../System.IO/types/FileStream.html">FileStream</a>
104 </td>
105 </tr>
106 <tr valign="top">
107 <td width="30%"><a href="types/Trace.html">class Trace</a></td>
108 <td width="60%"> Provides a set of methods and properties that help you trace the execution of your code. This class cannot be inherited. 
109 </td>
110 </tr>
111 <tr valign="top">
112 <td width="30%"><a href="types/TraceListener.html">class TraceListener</a></td>
113 <td width="60%"> Provides the base class for the listeners who monitor trace and debug output. 
114 </td>
115 </tr>
116 <tr valign="top">
117 <td width="30%"><a href="types/TraceListenerCollection.html">class TraceListenerCollection</a></td>
118 <td width="60%"> Provides a thread-safe list of <a href="../System.Diagnostics/types/TraceListener.html">TraceListener</a> objects. 
119 </td>
120 </tr>
121 <tr valign="top">
122 <td width="30%"><a href="types/TraceSwitch.html">class TraceSwitch</a></td>
123 <td width="60%"> Provides a multilevel switch to control tracing and debug output without recompiling your code. 
124 </td>
125 </tr>
126 </table>
127 </dd>
128 </dl><br><b>Enumerations</b><dl>
129 <dd>
130 <table border="1" width="90%" style="border-collapse: collapse">
131 <tr valign="top">
132 <th bgcolor="#C0C0C0">Enumeration</th>
133 <th bgcolor="#C0C0C0">
134 Description
135 </th>
136 </tr>
137 <tr valign="top">
138 <td width="30%"><a href="types/TraceLevel.html">enumeration TraceLevel</a></td>
139 <td width="60%"> Specifies what messages to output for the <a href="../System.Diagnostics/types/Debug.html">Debug</a>, <a href="../System.Diagnostics/types/Trace.html">Trace</a> and <a href="../System.Diagnostics/types/TraceSwitch.html">TraceSwitch</a> classes. 
140 </td>
141 </tr>
142 </table>
143 </dd>
144 </dl><br><b>Namepace hierarchy</b><br><ul class="none">
145 <li><a href="../System/types/Object.html">System.Object</a></li>
146 <ul class="none">
147 <li><a href="../System/types/Attribute.html">System.Attribute</a></li>
148 <ul class="none">
149 <li><a href="../System.Diagnostics/types/ConditionalAttribute.html">System.Diagnostics.ConditionalAttribute</a></li>
150 </ul>
151 <ul class="none">
152 <li><a href="../System.Diagnostics/types/DebuggableAttribute.html">System.Diagnostics.DebuggableAttribute</a></li>
153 </ul>
154 <ul class="none">
155 <li><a href="../System.Diagnostics/types/DebuggerHiddenAttribute.html">System.Diagnostics.DebuggerHiddenAttribute</a></li>
156 </ul>
157 <ul class="none">
158 <li><a href="../System.Diagnostics/types/DebuggerStepThroughAttribute.html">System.Diagnostics.DebuggerStepThroughAttribute</a></li>
159 </ul>
160 </ul>
161 <ul class="none">
162 <li><a href="../System.Diagnostics/types/Debug.html">System.Diagnostics.Debug</a></li>
163 </ul>
164 <ul class="none">
165 <li><a href="../System.Diagnostics/types/Debugger.html">System.Diagnostics.Debugger</a></li>
166 </ul>
167 <ul class="none">
168 <li><a href="../System.Diagnostics/types/ProcessStartInfo.html">System.Diagnostics.ProcessStartInfo</a></li>
169 </ul>
170 <ul class="none">
171 <li><a href="../System.Diagnostics/types/StackFrame.html">System.Diagnostics.StackFrame</a></li>
172 </ul>
173 <ul class="none">
174 <li><a href="../System.Diagnostics/types/StackTrace.html">System.Diagnostics.StackTrace</a></li>
175 </ul>
176 <ul class="none">
177 <li><a href="../System.Diagnostics/types/Switch.html">System.Diagnostics.Switch</a></li>
178 <ul class="none">
179 <li><a href="../System.Diagnostics/types/BooleanSwitch.html">System.Diagnostics.BooleanSwitch</a></li>
180 </ul>
181 <ul class="none">
182 <li><a href="../System.Diagnostics/types/TraceSwitch.html">System.Diagnostics.TraceSwitch</a></li>
183 </ul>
184 </ul>
185 <ul class="none">
186 <li><a href="../System.Diagnostics/types/Trace.html">System.Diagnostics.Trace</a></li>
187 </ul>
188 <ul class="none">
189 <li><a href="../System.Diagnostics/types/TraceListenerCollection.html">System.Diagnostics.TraceListenerCollection</a> --- <a href="../System.Collections/types/IList.html">System.Collections.IList</a>, <a href="../System.Collections/types/ICollection.html">System.Collections.ICollection</a>, <a href="../System.Collections/types/IEnumerable.html">System.Collections.IEnumerable</a></li>
190 </ul>
191 <ul class="none">
192 <li><a href="../System/types/MarshalByRefObject.html">System.MarshalByRefObject</a></li>
193 <ul class="none">
194 <li><a href="../System.ComponentModel/types/Component.html">System.ComponentModel.Component</a></li>
195 <ul class="none">
196 <li><a href="../System.Diagnostics/types/Process.html">System.Diagnostics.Process</a></li>
197 </ul>
198 </ul>
199 <ul class="none">
200 <li><a href="../System.Diagnostics/types/TraceListener.html">System.Diagnostics.TraceListener</a></li>
201 <ul class="none">
202 <li><a href="../System.Diagnostics/types/DefaultTraceListener.html">System.Diagnostics.DefaultTraceListener</a></li>
203 </ul>
204 <ul class="none">
205 <li><a href="../System.Diagnostics/types/TextWriterTraceListener.html">System.Diagnostics.TextWriterTraceListener</a></li>
206 </ul>
207 </ul>
208 </ul>
209 <ul class="none">
210 <li><a href="../System/types/ValueType.html">System.ValueType</a></li>
211 <ul class="none">
212 <li><a href="../System/types/Enum.html">System.Enum</a></li>
213 <ul class="none">
214 <li><a href="../System.Diagnostics/types/TraceLevel.html">System.Diagnostics.TraceLevel</a></li>
215 </ul>
216 </ul>
217 </ul>
218 </ul><br><i><a href="../documentation_license.txt">
219 Copyright (c) 2002 Microsoft Corporation. All rights reserved.
220 </a></i></body>
221 </html>